<?php
	function smarty_function_unset_session($params){
		$keys = explode(".", $params['var']);
		$str = "";
		foreach($keys as $v) $str.= "['".$v."']";
		$str = "\$_SESSION".$str;
		$str = "if (isset(".$str.")) unset(".$str.");";
		eval($str);
//		if (isset($_SESSION[$params['var']])) unset($_SESSION[$params['var']]);
	}
?>
